package cn.supermaster.management.core.manager;

import cn.supermaster.management.common.utils.MessageUtils;

import java.util.TimerTask;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: supermaster-management
 * @Package: cn.supermaster.management.core.manager
 * @ClassName: LoginInformationManager
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2021/1/11 1:11
 * @Version: V1.0
 * @Copyright: 2021 www.super-bytecode.comn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public class RecordLogManager {

    private static AsynchronousManager manager = AsynchronousManager.manager();

    /**
     * @Description: [记录登录日志信息]
     * <p></P>
     * @Title: doRecordLoginInformation
     * @Author: Lance Ting
     * @Date: 2021-01-11
     * @Param: username
     * @Param: status
     * @Param: message
     * @Param: counter
     * @Return: void
     */
    public static void doRecordLoginInformation(String username, String status, String message, Object counter) {
        String convertMessage = MessageUtils.message(message, counter);// 信息转换
        TimerTask timerTask = AsynchronousFactory.recordLoginInformation(username, status, convertMessage);
        manager.execute(timerTask);
    }


}